import java.util.HashMap;
import java.util.Map;

public class Work {
    public static void main(String[] args) {
        HashMap<String, Integer> map = new HashMap<>();
        map.put("wwbb", 1);
        map.put("wbwb", 2);
        Integer wwww = map.put("wwww", 3);
        Integer wwww1 = map.put("wwww", 33);
        System.out.println(wwww1);
        System.out.println(map);
        System.out.println(map.get("wwww"));

        // 打印所有key
        for (String s : map.keySet()) {
            System.out.print(s + " ");
        }

        // 打印所有value
        for (Integer i : map.values()) {
            System.out.print(i + " ");
        }
        System.out.println();
        // 打印所有键值对
        for(Map.Entry<String,Integer> entry: map.entrySet()){
            System.out.print(entry.getKey()+":"+entry.getValue()+"    ");
        }
    }
}
